<!DOCTYPE html>
<html>
<head>
    <title>js类型Type</title>
    <meta charset="utf-8"/>
    <script src="../../js/jquery-1.10.1.min.js"></script>
    <script>
        //5种简单数据类型： Undefined, Null, Boolean, Number和String
//        var i = 0;
//        alert(typeof i);
//        var obj = null;
//        alert(typeof obj);
//        var define = undefined;
//        alert(typeof define);
//
//        var s = "555";
//        alert(typeof s);
//
//        var array = new Array("1", "2");//["red", "green", "blue"];
//        alert(Object.prototype.toString.call(array));
//        alert(typeof array);

        var num1 = parseInt("1234Blue");
        var num2 = parseInt("");
        var num3 = parseInt("0xC");
        var num4 = parseInt("22.6");
        var num5 = parseInt("020");
        var num6 = parseInt("70");
        var num7 = parseInt("0xe");
        alert(num1 + "," + num2 + "," + num3 + "," + num4 + "," + num5 + "," + num6 + "," +num7 + "." );

        alert(parseInt("010") + "," + parseInt("010", 8) + "---" + parseInt("090") + "---" + parseInt("AF", 16) + "," + parseInt("111", 8) + "," + parseInt("111", 2));

        alert(parseInt("08")-parseInt("03"));

        var data = [0, 1, 2, 3];
        var arrayFilter = data.filter(function(item) {
            return item;
        });
        console.log(arrayFilter); // [1, 2, 3]
    </script>
</head>
<body>
<p>js类型Type</p>
</body>
</html>